<template>
	<view class="">
		<view class="content">
			<view class="topBg"></view>
			<view class="content_info">
				<!-- 活动具体信息 -->
				<detail-info :activityTitle="activityInfo.luckdrawName" :finishTime="activityInfo.activityTime"
					:bottomTimeShow="false">
					<view class="other-content" slot="other" v-if="activityInfo.activityTime">
						活动时间:{{activityInfo.timeStr}}
					</view>
				</detail-info>
				<!-- 活动奖品 -->
				<detail-prize :prizeList="activityInfo.peerGsList"></detail-prize>
				<!-- 组队成员 -->
				<detail-group-team :numberClusters="activityInfo.numberClusters"
					:noNumberClusters="activityInfo.noNumberClusters" :status="activityInfo.status"
					:customerVoList="activityInfo.customerVoList" :isAgree="isAgree" :activityId="activityId"
					:activityName="activityInfo.luckdrawName" :fsUrl="baseImageUrl+activityInfo.fsUrl"
					:toCustomerNo="toCustomerNo" @share="shareActivity" @agreenTeam="agreenTeam"></detail-group-team>
				<!-- 活动门店 -->
				<view v-if="activityInfo.clientStoreDto.length > 0" style="margin-top: 20upx;">
					<home-title title="活动门店" type="2"></home-title>
					<view style="margin-bottom: 20upx;" v-for="(item, index) in activityInfo.clientStoreDto"
						:key="index">
						<store-cell :isLocation="0" :storeName="item.storeName" :storeAddress="item.address"
							:distance="item.distance" :phone="item.contactPhone" :latitude="item.lat"
							:longitude="item.lon"></store-cell>
					</view>
				</view>
				<!-- 活动介绍 -->
				<detail-introduce :richInfo="activityInfo.content"></detail-introduce>
			</view>
		</view>

	</view>
</template>

<script>
	import detailSwiper from "@/components/activity/activity-detailSwiper.vue"
	import detailInfo from '@/components/activity/activity-detailInfo.vue'
	import homeTitle from '@/components/activity/mmv-home-title.vue'
	import storeCell from '@/components/activity/store-cell.vue'
	import detailPrize from '@/components/activity/activity-detailPrize.vue'
	import detailGroupTeam from '@/components/activity/activity-detailGroupTeam.vue'
	import detailIntroduce from '@/components/activity/activity-detailIntroduce.vue'
	import {
		clientPeerInfo
	} from '@/api/marketingB-helper.js'
	import settings from '@/settings.js';
	export default {
		components: {
			detailInfo,
			homeTitle,
			storeCell,
			detailPrize,
			detailGroupTeam,
			detailIntroduce,
		},
		data() {
			return {
				activityId: '',
				activityInfo: {},
			}
		},
		onLoad(op) {
			this.activityId = JSON.parse(op.param).bizNo;
			this.getData();
		},
		methods: {
			//获取详情数据
			getData() {
				clientPeerInfo({
					bizNo: this.activityId,
				}).then(res => {
					this.activityInfo = res.data;
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		&_info {
			padding: 0 30upx;
			position: relative;
			top: 40upx;
		}
	}

	.other-content {
		font-size: 20upx;
		font-family: PingFang SC, PingFang SC-Medium;
		font-weight: bold;
		text-align: left;
		color: #232323;
	}
</style>
